package com.jiesen.base.utils;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author bao
 */
public class IPInfoUtil {

    private static final Logger log = LoggerFactory.getLogger(IPInfoUtil.class);
    /**
     * Mob全国天气预报接口
     */
    private final static String GET_WEATHER = "http://apicloud.mob.com/v1/weather/ip?key=270c4d225bcf0&ip=";


    /**
     * 获取IP返回地理天气信息
     *
     * @param ip ip地址
     * @return
     */
    public static String getIpInfo(String ip) {
        if (null != ip) {
            String url = GET_WEATHER + ip;
            String result = HttpUtil.sendGet(url);
            return result;
        }
        return null;
    }


}


